<div id="category-manage-view">
  <div class="page">
    <div class="al-list-container">
      <form class="form-horizontal al-search-container" role="form">
        <div class="form-group">
          <label class="col-sm-1 control-label">所属公寓</label>
          <div class="col-sm-3">
            <div class="form-control">{{data.apartmentName}}</div>
          </div>
          <label class="col-sm-1 control-label">房型</label>
          <div class="col-sm-3">
            <div class="form-control">{{data.name}}</div>
          </div>
          <div class="col-sm-1">
            <button type="button" ng-click="queryData()" class="btn btn-success al-float-right">查询</button>
          </div>
          <div class="col-sm-1">
            <button type="button" ng-click="resetSearch()" class="btn btn-default">重置</button>
          </div>
          <div class="col-sm-1">
            <button type="button" class="btn btn-primary" ng-click="newData()">新增图片</button>
          </div>
        </div>
      </form>
      <table ng-table="tableParams"
             class="table  table-bordered table-striped table-condensed al-table-container">
        <thead>
        <tr>
          <td>所属公寓</td>
          <td>所属房型</td>
          <td>图片</td>
          <!--<td>类型</td>-->
          <td>内容</td>
          <td>备注</td>
          <td>链接</td>
          <td>排序</td>
          <td>操作</td>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="item in $data">
          <td>{{data.apartmentName}}</td>
          <td>{{data.name}}</td>
          <td><img ng-if="item.url" ng-src="{{item.url}}" width="80px" height="80px"/></td>
          <!--<td>{{item.type}}</td>-->
          <td>{{item.imageContent}}</td>
          <td>{{item.description}}</td>
          <td>{{item.link}}</td>
          <td>{{item.sorting}}</td>
          <td>
            <button class="btn btn-warning btn-sm" ng-click="editData(item)">编辑</button>
            <button class="btn btn-danger btn-sm" ng-confirm-click="确定要删除这个图片吗？" ng-click="removeData(item)">删除</button>
          </td>
        </tr>
        </tbody>
      </table>
    </div>
  </div>
</div>
